#include <iostream>
#include <vector>
#include <unordered_map>
using namespace std;
const int N = 1100;
int a[N];
unordered_map<int, bool> flag; 
int main() {
    int n;
    cin >> n;
    if(n == 1) {
        cout << "Not jolly" << endl;
        return 0;
    }
    for(int i = 0; i < n; i++) {
        cin >> a[i];
    }
    for(int i = 1; i < n; i++) {
        int t = abs(a[i] - a[i - 1]);
        flag[t] = true;
    }
    int t = 1;
    for(int i = 1; i <= n - 1; i++) {
        if(flag[i] != true) {
            t = 0;
        }
    }
    if(t)
        cout << "Jolly" << endl;
    else{
        cout << "Not jolly" << endl;
    }
    return 0;
}